<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=path %>/js/kindeditor-4.1.10/themes/default/default.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="<%=path %>/js/kindeditor-4.1.10/kindeditor-all-min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%=path %>/js/kindeditor-4.1.10/lang/zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.3.js"></script>
<link id="easyuiTheme" rel="stylesheet" type="text/css"	href="<%=path %>/js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/css/default.css">
<script type="text/javascript" src="<%=path %>/js/easyui/jquery.easyui.min.js"></script>
<script	src="<%=path %>/js/easyui/locale/easyui-lang-zh_CN.js"	type="text/javascript"></script>
<script src="<%=path %>/js/common.js" type="text/javascript"></script>
<script type="text/javascript" src="<%=path %>/js/ajaxfileupload.js"></script>
<title>公司信息添加</title>
</head>
<body class="easyui-layout" style="visibility:hidden;">
<div region="north" style="height:31px;overflow:hidden;" split="false" border="false" >
	<div class="datagrid-toolbar">
		<a id="save" icon="icon-save" href="#" class="easyui-linkbutton" plain="true" >保存</a>
	</div>
</div>
	<script type="text/javascript">
		$(function(){
			$('#save').click(function(){
				//有效性验证
				if(!$('#form').form('validate')){
					$.messager.alert('提示','表单还未填写完成!');
					return ;
				}
			
				$.post("${pageContext.request.contextPath }/admin/company/addcompany.do",$("#form").serialize(), function(data){
					if(data.status == 200){
						 //刷新当前页面.
						 $.messager.alert('提示', data.data, 'info', function() {
								$("#companyAddWindow").window('close');
								$("#companyList").datagrid("reload");
						});
					}else{
						 //刷新当前页面.
						 $.messager.alert('提示', data.data, 'info', function() {
								$("#companyAddWindow").window('close');
								$("#companyList").datagrid("reload");
						});
					}
				},'json');
			});
		});
		
	</script>
	
<div region="center" style="overflow:auto;padding:5px;" border="false">
     <form id="form" method="post">
         <table class="table-edit"  width="100%" align="left">
       		<tr class="title">
				<td colspan="2">公司集团信息</td>
			</tr>
			<tr>
				<td>公司名称:</td>
				<td><input type="text" name="name" class="easyui-validatebox" data-options="required:true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td width="200">公司简介:</td>
				<td>
					<textarea  rows="5" name="about" class="textarea easyui-validatebox" required="true" style="height:200px;width: 80%;"></textarea>						
				</td>
			</tr>
			<tr>
        		<td>电话:</td><td><input type="text" name="grouptel" id="grouptel" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td>集团客服电话：</td>
        		<td>
        			<input type="text" name="groupservicetel" id="groupservicetel" class="easyui-validatebox" required="true" style="width: 80%"/>
        		</td>
			</tr>
			<tr>
        		<td>招聘邮箱:</td><td><input type="text" name="advertiseemail" id="advertiseemail" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td>集团总部地址：</td>
        		<td>
        			<input type="text" name="groupaddress" id="groupaddress" class="easyui-validatebox" required="true" style="width: 80%"/>
        		</td>
			</tr>
			<tr>
        		<td>版权:</td><td><input type="text" name="copyright" id="copyright" class="easyui-validatebox" required="true" style="width: 80%"/></td>
			</tr>
			<tr>
				<td>备案信息：</td>
        		<td>
        			<input type="text" name="record" id="record" class="easyui-validatebox" style="width: 80%"/>
        		</td>
			</tr>
        </table>
      </form>
</div>
</body>
</html>